package net.htjs.jdkgrammer.jdk16;

import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Slf4j
public class DateTest {

    public static void main(String[] args) {
        //在DateTimeFormatter.ofPattern传入B可以获取现在时间对应的日时段，上午，下午等
        log.info(DateTimeFormatter.ofPattern("B").format(LocalDateTime.now()));
    }
}
